{extend name="admin@public/base_content" /}
<!--头部描述信息开始<div class="container-fluid am-cf">-->
{block name="content_header">}{include file="admin@public/common" /}{/block}
<!--头部描述信息结束-->
<!-- 内容区域开始 <div class="row-content am-cf">-->
{block name="body">}
<div class="row-content am-cf">
    <div class="row">
        <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
            <div class="widget am-cf">
                <div class="widget-body am-fr">
                    <form class="m-form tpl-form-border-form tpl-form-border-br" role="form" action="{:url('')}" method="post" id="ajax_form"  >

                        <div class="am-form-group">
                            <label class="am-u-sm-3 am-form-label" > 名称 </label>
                            <div class="am-u-sm-3">
                                <input type="text" name="name" id="name" required placeholder=" 当前字段的描述" class="tpl-form-input" />
                            </div>
                        </div>

                        <div class="am-form-group">
                            <label class="am-u-sm-3 am-form-label" > 字段名 </label>
                            <div class="am-u-sm-3">
                                <input type="text" name="field"  id="field" required placeholder=" 字段名只能为英文数字和下划线！" class="tpl-form-input" />
                            </div>
                        </div>

                        <div class="am-form-group">
                            <label class="am-u-sm-3 am-form-label" > 字段类型 </label>
                            <div class="am-u-sm-3">
                                <select class="tpl-form-input" name="type" id="type">
                                    {foreach name="typeField" item="vo"}
                                    <option value="{$key}">{$vo.name}（{$propertyField[$vo.property]['name']}）</option>
                                    {/foreach}
                                </select>
                            </div>
                        </div>

                        <div class="am-form-group">
                            <label class="am-u-sm-3 am-form-label" > 字段配置 </label>
                            <div class="am-u-sm-3">
                                <textarea name="config" id="config" placeholder="如果为选择或下拉等类型时多个项目名用逗号分隔开" style="height:80px;"></textarea>
                            </div>
                        </div>

                        <div class="am-form-group">
                            <label class="am-u-sm-3 am-form-label" > 默认值 </label>
                            <div class="am-u-sm-3">
                                <input type="text" name="default" id="default" placeholder=" 默认的内容" class="tpl-form-input" />
                            </div>
                            <div class="am-u-sm-5">
                                如果为选择或下拉等类型时填写默认选择值，多个值用逗号分隔开
                            </div>
                        </div>

                        <div class="am-form-group">
                            <label class="am-u-sm-3 am-form-label" > 推荐位顺序 </label>
                            <div class="am-u-sm-3">
                                <input type="number" name="sequence" value="0" min="0" id="sequence" required placeholder=" 数字越小越靠前" class="tpl-form-input" />
                            </div>
                        </div>

                        <div class="am-form-group">
                            <div class="am-u-sm-9 am-u-sm-push-3">
                                <input type="hidden" name="fieldset_id" type="hidden" value="{$fieldsetInfo.fieldset_id}">
                                <button type="button" class="am-btn am-btn-primary tpl-btn-bg-color-success" id="btn">保存</button>
                                <button type="reset" class="am-btn am-btn-default">重置</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
{/block}
<!-- 内容区域结束 -->